<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>王者荣耀竞猜管理平台</title>
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/jquery-easyui-1.5.3/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css"
          href="${pageContext.request.contextPath}/static/jquery-easyui-1.5.3/themes/icon.css">
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/jquery-easyui-1.5.3/jquery.min.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/static/jquery-easyui-1.5.3/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<div align="center">
    <form id="ff" method="post" action="/roomInfo/save" enctype="multipart/form-data">
        <table cellpadding="5">
            <tr>
                <td>房间名称：</td>
                <td><input class="easyui-textbox" type="text" id="fdName" name="fdName" data-options="required:true"/>
                </td>
            </tr>
            <tr>
                <td>房间背景：</td>
                <td><input class="easyui-filebox" name="roomPic" id="roomPic"
                           data-options="prompt:'选择图片...',required:true,buttonText:'选择图片',accept: 'image/*',buttonAlign:'right',editable:false">
                </td>
            </tr>
            <tr>
                <td>房间最多人数：</td>
                <td><input class="easyui-textbox" type="text" id="fdNum" name="fdNum" data-options="required:true"/>
                </td>
            </tr>
            <tr>
                <td>战队A：</td>
                <td><input type="text" id="fdClanAId" name="fdClanAId" class="easyui-combobox" data-options="
                    required:true,
                    valueField: 'fdId',
                    textField: 'fdName',
                    editable:false,
                    url: '/clanInfo/comboList',
                    onSelect:function(record){
                        $('#fdClanAName').val(record.fdName);
                    },
                    onLoadSuccess: function (data) {
                       $('#fdClanAId').combobox('select', data[0].fdId);
                    }"/>
                    <input type="hidden" name="fdClanAName" id="fdClanAName">
                </td>
            </tr>
            <tr>
                <td>战队A胜利场数：</td>
                <td><input class="easyui-textbox" type="text" id="fdClanAWinNum" name="fdClanAWinNum"
                           data-options="required:true"/></td>
            </tr>
            <%--<tr>--%>
                <%--<td>战队A单场赔率：</td>--%>
                <%--<td><input class="easyui-textbox" type="text" id="fdClanAScale" name="fdClanAScale"--%>
                           <%--data-options="required:true"/></td>--%>
            <%--</tr>--%>
            <tr>
                <td>战队A总场赔率：</td>
                <td><input class="easyui-textbox" type="text" id="fdClanATotalScale" name="fdClanATotalScale"
                           data-options="required:true"/></td>
            </tr>
            <tr>
                <td>战队A击杀人数：</td>
                <td><input class="easyui-textbox" type="text" id="fdAKiilNum" name="fdAKillNum"/></td>
            </tr>
            <tr>
                <td>战队B：</td>
                <td><input type="text" id="fdClanBId" name="fdClanBId" class="easyui-combobox" data-options="
                    required:true,
                    valueField: 'fdId',
                    textField: 'fdName',
                    editable:false,
                    url: '/clanInfo/comboList',
                    onSelect:function(record){
                        $('#fdClanBName').val(record.fdName);
                    },
                    onLoadSuccess: function (data) {
                       $('#fdClanBId').combobox('select', data[0].fdId);
                    }"/>
                    <input type="hidden" id="fdClanBName" name="fdClanBName"/>
                </td>
            </tr>
            <tr>
                <td>战队B胜利场数：</td>
                <td><input class="easyui-textbox" type="text" id="fdClanBWinNum" name="fdClanBWinNum"
                           data-options="required:true"/></td>
            </tr>
            <%--<tr>--%>
                <%--<td>战队B单场赔率：</td>--%>
                <%--<td><input class="easyui-textbox" type="text" id="fdClanBScale" name="fdClanBScale"--%>
                           <%--data-options="required:true"/></td>--%>
            <%--</tr>--%>
            <tr>
                <td>战队B总场赔率：</td>
                <td><input class="easyui-textbox" type="text" id="fdClanBTotalScale" name="fdClanBTotalScale"
                           data-options="required:true"/></td>
            </tr>
            <tr>
                <td>战队B击杀人数：</td>
                <td><input class="easyui-textbox" type="text" id="fdBKillNum" name="fdBKillNum"/></td>
            </tr>
            <tr>
                <td>让场战队：</td>
                <td><input class="easyui-combobox" type="text" id="fdLetClanId" name="fdLetClanId" data-options="required:true,
                    valueField: 'fdId',
                    textField: 'fdName',
                    editable:false,
                    url: '/clanInfo/comboList',
                    onSelect:function(record){
                        $('#fdLetClanName').val(record.fdName);
                    },
                    onLoadSuccess: function (data) {
                       $('#fdLetClanId').combobox('select', data[0].fdId);
                    }"/>
                    <input type="hidden" id="fdLetClanName" name="fdLetClanName"/>
                </td>
            </tr>
            <tr>
                <td>让场次数：</td>
                <td><input class="easyui-textbox" type="text" id="fdLetNum" name="fdLetNum"
                           data-options="required:true"/></td>
            </tr>
            <%--<tr>--%>
                <%--<td>总场击杀人数：</td>--%>
                <%--<td><input class="easyui-textbox" type="text" id="fdTotalKill" name="fdTotalKill"--%>
                           <%--data-options="required:true"/></td>--%>
            <%--</tr>--%>

            <tr>
                <td>总场大小单双赔率：</td>
                <td><input class="easyui-textbox" type="text" id="fdTotalSizeScale" name="fdTotalSizeScale"
                           data-options="required:true"/></td>
            </tr>
            <tr>
                <td>特码赔率：</td>
                <td><input class="easyui-textbox" type="text" id="fdSpecialScale" name="fdSpecialScale"
                           data-options="required:true"/></td>
            </tr>
            <tr>
                <td>比赛结果：</td>
                <td><input type="radio" name="fdResult" data-options="required:true"
                           value="-1"/>A方胜
                    <input type="radio" name="fdResult" data-options="required:true"
                           value="1"/>B方胜
                    <input type="radio" name="fdResult" data-options="required:true"
                           value="0" checked/>比赛中
                </td>
            </tr>
            <tr>
                <td>所属赛事：</td>
                <td><input class="easyui-combobox" type="text" id="fdRaceId" name="fdRaceId"
                           data-options="
                    required:true,
                    valueField: 'fdId',
                    textField: 'fdName',
                    editable:false,
                    url: '/raceInfo/comboList',
                    onSelect:function(record){
                        $('#fdRaceName').val(record.fdName);
                        $('#fdGameId').val(record.fdGameId);
                        $('#fdGameName').val(record.fdGameName);
                        $('#fdGameName').textbox('setValue',record.fdGameName);
                        <%--alert(record.fdGameName);--%>
                    },
                    onLoadSuccess: function (data) {
                       $('#fdRaceId').combobox('select', data[0].fdId);
                       $('#fdGameName').textbox('setValue',record.fdGameName);
                    }"/>
                    <input type="hidden" id="fdGameId" name="fdGameId"/>
                    <input type="hidden" id="fdRaceName" name="fdRaceName"/>
                    <%--<input type="hidden" id="fdGameName" name="fdGameName"/>--%>
                </td>
            </tr>
            <tr>
                <td>游戏名称：</td>
                <td><input class="easyui-textbox" type="text" id="fdGameName" name="fdGameName" data-options="required:true" readonly/>
                </td>
            </tr>
            <%--<tr>--%>
                <%--<td>关联游戏：</td>--%>
                <%--<td><input class="easyui-combobox" type="text" id="fdGameId" name="fdGameId"--%>
                           <%--data-options="--%>
                    <%--required:true,--%>
                    <%--valueField: 'fdId',--%>
                    <%--textField: 'fdName',--%>
                    <%--editable:false,--%>
                    <%--url: '/gameInfo/comboList',--%>
                    <%--onSelect:function(record){--%>
                        <%--$('#fdRaceName').val(record.fdName);--%>
                        <%--$('#fdGameId').val(record.fdGameId);--%>
                        <%--$('#fdGameName').val(record.fdGameName);--%>
                    <%--},--%>
                    <%--onLoadSuccess: function (data) {--%>
                       <%--$('#fdRaceId').combobox('select', data[0].fdId);--%>
                    <%--}"/>--%>
                <%--</td>--%>
            <%--</tr>--%>

            <tr>
                <td>当前比赛场次：</td>
                <td><input class="easyui-textbox" type="text" id="fdCurrentNum" name="fdCurrentNum" data-options="required:true"/>
                </td>
            </tr>

            <tr>
                <td>房间开盘时间：</td>
                <td>
                    <input class="easyui-datetimebox" name="fdStartTime"
                           data-options="required:true,showSeconds:true,editable:false" value=""/>
                </td>
            </tr>

            <tr>
                <td>房间封盘时间：</td>
                <td>
                    <input class="easyui-datetimebox" name="fdEndTime"
                           data-options="required:true,showSeconds:true,editable:false" value=""/>
                </td>
            </tr>

            <input type="hidden" value="0" id="fdIsSettle" name="fdIsSettle">
        </table>
    </form>
    <div style="text-align:center;padding:5px">
        <a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">提交</a>
        <a href="javascript:void(0)" style="margin-left: 20px" class="easyui-linkbutton" onclick="clearForm()">重置</a>
    </div>
</div>
</body>
<script src="${pageContext.request.contextPath}/static/pages/roomInfo/add.js"></script>
</html>